<?php
class Zend_View_Helper_ShowUserIndex {
    public function showUserIndex($view) {

    	$user = $view->User;
    	$str='';
       	$str .= '<table id="product-table" border="0" cellpadding="0" cellspacing="0" width="100%">';
		$str .= '<tr>';

    	$str .= '<th class="table-header-repeat line-left minwidth-1"><a href="">User Id</a></th>';

    	$str .= '<th class="table-header-repeat line-left minwidth-1"><a href="">User Name</a></th>';
    
		$str .= '<th class="table-header-repeat line-left minwidth-1"><a href="">Full Name</a></th>';
		$str .= '<th class="table-header-repeat line-left minwidth-1"><a href="">Email</a></th>';
	
		$str .= '<th class="table-header-repeat line-left minwidth-2"><a href="">Thao Tác</a></th>';
		$str .= '</tr>';

        
        foreach ($user as $user) {
        	$str .= '<tr>'; 	

            $str .='<td>'.$user->user_id.'</td>';

            $str .='<td>'.$user->user_name.'</td>';
       
			 $str .='<td>'.$user->full_name.'</td>';
            $str .='<td>'.$user->email.'</td>';

            $str .= '<td class="options-width">';
            $str .= '<a title="Sửa" class="icon-1 info-tooltip" href="'.$view->url(array('controller'=>'user', 'action'=>'edit', 'user_id'=>$user->user_id)).'"></a> ';
            $str .= '<a title="Thêm" class="icon-3 info-tooltip" href="'.$view->url(array('controller'=>'user', 'action'=>'add','user_id'=>$user->user_id)).'"></a>';
            $str .= '<a title="Xóa" class="icon-2 info-tooltip" href="'.$view->url(array('controller'=>'user', 'action'=>'delete','user_id'=>$user->user_id)).'"></a></td>';
            $str .='</tr>';
        }
        
        $str .= '</table>';
        
        return $str; 

    }
}